"use strict";

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.bulkInsert(
      "menu",
      [
        {
          menu_name: "系统管理",
          menu_parent_id: 0,
          menu_path: "/settingSystem",
          menu_router_name: "settingSystem",
          menu_component: "",
          menu_icon: "",
          menu_type: "1",
          is_show: 1,
          created_at: new Date(),
          updated_at: new Date(),
        },
        {
          menu_name: "路由管理",
          menu_parent_id: 1,
          menu_path: "settingRouter",
          menu_router_name: "settingRouter",
          menu_component: "/views/admin/SettingRouter",
          menu_icon: "Plus",
          menu_type: "2",
          is_show: 1,
          created_at: new Date(),
          updated_at: new Date(),
        },
        {
          menu_name: "用户管理",
          menu_parent_id: 1,
          menu_path: "SettingUser",
          menu_router_name: "SettingUser",
          menu_component: "/views/admin/SettingUser",
          menu_icon: "Plus",
          menu_type: "2",
          is_show: 1,
          created_at: new Date(),
          updated_at: new Date(),
        },
        {
          menu_name: "角色管理",
          menu_parent_id: 1,
          menu_path: "settingRole",
          menu_router_name: "settingRole",
          menu_component: "/views/admin/SettingRole/index",
          menu_icon: "Plus",
          menu_type: "2",
          is_show: 1,
          created_at: new Date(),
          updated_at: new Date(),
        },
      ],
      {}
    );
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.bulkDelete("menu", null, {});
  },
};
